invoke

inline operator fun <T> invoke(callable: () -> T): Try<T>

Creates a new Try based on the result of the callable.

Return

An instance of Success or Failure, depending on whether the operation.

Parameters

callable

A callable operation.